package com.hcy.orderclient;

import com.hcy.ordermodel.dto.request.*;
import com.hcy.ordermodel.dto.response.HomeInfoResponseDTO;
import com.hcy.ordermodel.dto.response.AddOrderResponseDTO;
import com.hcy.ordermodel.dto.response.OrderInfoResponseDTO;
import com.hcy.ordermodel.dto.response.SimpleOrderResponseDTO;
import com.hcy.rabbitbasicmodel.model.ResponseData;
import com.hcy.rabbitbasicmodel.signl.Finish;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @Author huchenying
 * @Description
 * @Date 2021/12/22 15:56
 */
@FeignClient(name = "order-service-api")
public interface OrderForDriverClient {
    @PostMapping("/driver/bindTrack")
    ResponseData<SimpleOrderResponseDTO> bindTrack(@Validated @RequestBody BindTrackRequestDTO requestDTO);
    @PostMapping("/driver/addOrder")
    ResponseData<AddOrderResponseDTO> addOrder(@Validated @RequestBody AddOrderRequestDTO requestDTO);
    @PostMapping("/driver/updateOrder")
    ResponseData<SimpleOrderResponseDTO> updateOrder(@Validated @RequestBody UpdateOrderRequestDTO requestDTO);
    @PostMapping("/driver/findDriverHomeInfo")
    ResponseData<HomeInfoResponseDTO> findDriverHomeInfo(@Validated @RequestBody HomeInfoRequestDTO requestDTO);
    @PostMapping("/driver/orderDetails")
    ResponseData<OrderInfoResponseDTO> orderDetails(@Validated @RequestBody DriverOrderRequestDTO requestDTO);
    @PostMapping("/driver/finishOrder")
    ResponseData<SimpleOrderResponseDTO> finishOrder(@RequestBody @Validated({Finish.class}) UpdateOrderRequestDTO requestDTO);
    @PostMapping("/driver/addDriverForOrder")
    ResponseData<SimpleOrderResponseDTO> addDriverForOrder(@Validated @RequestBody AddDriverForOrderRequestDTO requestDTO);
    @PostMapping("/driver/getSimpleOrder")
    ResponseData<SimpleOrderResponseDTO> getSimpleOrder(@Validated @RequestBody DriverOrderRequestDTO requestDTO);
    @PostMapping("/driver/cancelOrder")
    ResponseData<SimpleOrderResponseDTO> driverCancelOrder(@Validated @RequestBody CancelOrderRequestDTO requestDTO);
    @PostMapping("/driver/getOrderList")
    ResponseData<List<OrderInfoResponseDTO>> getOrderList(@Validated @RequestBody DriverOrderListRequestDTO requestDTO);
}
